#include <iostream>

using namespace std;

double getInputArg() {
    cout << "Enter a double number: " << "\n";
    double result{};
    cin >> result;
    return result;
}

char getInputSymbol() {
    cout << "Enter a symbol + - * / : " << "\n";
    char result{};
    cin >> result;
    return result;
}

double getResult(double x, double y, char theSymbol) {
    switch (theSymbol) {
        case '+':
            return x + y;
        case '-':
            return x - y;
        case '*':
            return x * y;
        case '/':
            return x / y;
    }
}

void printResult(double x, double y, char theSymbol) {
    if (theSymbol == '+' || theSymbol == '-' || theSymbol == '*' || theSymbol == '/') {
        cout << x << " " << theSymbol << " " << y << " = " << getResult(x, y, theSymbol) << "\n";
    }
}

int main() {
    double x { getInputArg() };
    double y { getInputArg() };
    char theSymbol { getInputSymbol() };
    printResult(x, y, theSymbol);

    return 0;
}